Replaced window with global