splitting game updates into update and draw functions