refactoring console-in progress