console refactoring