better random method