changed to sort matching results by ascending order of ID