optimize the upper limit of racket solution