fix discrete selection always return len-1
use new random object
sample path almost done