added serializing and deserializing nodes from file