weighted random number generator added