=refactor and fix typos