Added rest of prime finding functionality