Modified Ex50.hs