alter code to support send reply.