change protocal and serialize