add method compose_within_bounds