add serialize support