cleanedup code, added comments, reads as HW2 now