fix upper bound on problem 29