Added serialize_all method