logic gates modification