frankensteined code from vampus1, vampus2, and some stuff from class, then added the game loop and some handling