have a basic design for updating the upper bound
improved readability for upper bound code