documented utils
fix for rejection sampler