refactoring of deep, vertical and linear