updated filter logic to parse by gender