added modular subtraction code (copy of subtraction)