refactoring of tt console module