fixed addmatch method