implemented rounding in is_prime? method to ensure no unintended floats in range