typos, refactoring