fix typos, add optimization setting