Fix dictsMatch and add helper function