refactor deep blocks