iterate throught only prime numbers