message code implementation