Why was writing a key invention for the Sumerians?