fixed rand generator - old way
fixed rand generator - old way
NEW VERSION cleanup