Use $window instead of window