pull out a deserialize function for symmetry and clarity