fix match before end
added multiple matches for ordered match