Loop modified(Not checking 1.prime?)