added more serializtion code to models