cleaned up code to turn in