adding add and substract function