add logic gate