finding roots mod n