Completed 5.1, added parity algo