Implemented gender sort