misc. review and refactor