typos & refactor