class to choose the best upper limit for vis algorithms