added console mode