rename mask-finding function to trace