Update functions 2.hs