small tweak to random