Implement upper limit for uniform cost