Added different mechanism for existing when match is found
First crack at testing for exit after first match