Add test for parity
add backpropagation algorithm: