change random method