quality-19 Refactoring simplify logic
https://github.com/regidev/mte/issues/issue/19