block def refactoring