add 3.1.2 random method