the restructuring continues. almost there. need to implement the write function, which is the last test case that fails...