Add mate detection