added basic game loop