add patial implementation of game loop