homework2

reactoring for 2nd homework