some troubles comparing lists
removed mat parametre from insert_unique_sorted function