updating equations to handle divide, multiply, and subtract