generated a window controller with an index method