The many stages of writing a paper