added $window injection