add discrete method in StdRandom