created the prime method