add prelimiary hack to serialize/deserialize enums
implement serialization to json/file