Added list support to logic gates