implements structure to serialize and save root object