very minor edits to tidy