change in prime algorithm