Added a random and weightedRandom Functions