fixed condition for prime check