detect gender correctly