change function name parity to parityOf