back to working state, refactoring completed