refactored console class