Added some code to display a window