createWindow added to functions