Turn datastructure and Write method. Testing to do.