made changes to gender checker function