Make better use of optimist