code for message process

code for message process