chore(refactor): use referenced optimist variable

Optimist is assigned to a variable so use it