trying to make game loop work with the written library functions, can move left and right so far