Sort the notes