add serialize test code