• changed API (removed window and document passing)