added a console interactive mode