hw2 code compiles, need debugging