added gender filtering javascript functionality