Updated prime method.