part 1 of hw3.hs