constrain to doc bounds