Compressed some code in 4.hs