everything except for writing to file