add logic gates