added game loop stuffs