Matching function works buggy, populate to test