refactoring & fix typo