added some serialization stuff