refactor + closure