implement console functionality