added more functionality to window