added new API method getCurrentWIndow