ENH: generating random sequence