remove duplicated matches and display matches in order.