making prime generation faster