- added some serialization code (still working on it)