improved genparticle hash