added if to add and subtract