putting sentences in order