upper bounding loops