resolves #39
implementing bound and rand_between