add samplebase, randi, and categorical