fixed the modulo