add - method is_prime().
mod - slightly more efficient way of computing prime.