Refactor to facilitate blocking in