refactor add and sub fns