updated single player code, multiplayer still being worked on, comments out of date