updates to serialToJSON