copied hw3_peter.hs to hw3_final.hs