Changing this to window for location call