finished generic arithmetic operations