Update functions.hs