added gender detection