add createWindow method