Added CPP version of message passing