next prime function added