small improvement in heurisitcrandom