Refactored left and right using modulus