switch from divide to and

This is slightly faster.