p: sort by length of match, and add comments