get the upper bound right