StartedWriting algorithm