fixed refactoring+config