modulus not working,trying to figure out an alternative