fixed bug in dec sampling, and updated doc strings