typo fix; refactor