Update functions add and sub.