modified to allow command messages