got the random method to work