refactoring and (console :/ ) output