Cache modulo operator in New

Instead of recreating the operator in each iterator, we can cache it before the loop.