refactoring, new stage started, tests added