begin implementing serialize deserialize