Implemented a guess of how sample_bounds works. NOT TESTED.