added P18.hs