refactor(console) handler