added validation so that anything under 2 is already detected as not prime