added and/or standardized checks for wraparound with subtraction, and for incrementing