command/subscribe implementation