Fixed matching algorithm and return list of matches