mate detedtion