fix typos
small refactoring