Modified findprimes

made some changes