Constructed SUM gate (not working)