Update functions combining with unit tests