added handling case when multiple matches arrive