Added support for multiple matches