some work on hw4.hs, not complete