Function match was changed to return proper value