Writing and thinking