mtrand: remove it and replace with simpler, generic code