added browser option, introduced $window