testing / implementing gate