Lab 6: added serialization