fixed the dec to sex formula