refactoring of the calculation layer ordering