updates bits.c with working parity function