added support for an internal command mode