add cpp version party command pattern