refactoring
deferred close management