add source for random function.