finished P19.hs