Updated for Prime number detection code