refine the boundary cheek for upper bound setting