moved key glut window functions to standalone function