improved the prime? method