Added xnor functionality and fixed and update bug