how to calculate the modulo - Search