fixes slow randomize calls