refactorings for closures