modified gender.py