Rewrote parity and subtituted it with something more simple