almost finished w P17.hs