p192 3.28-3.30 basic gate function
p195 3.31 add-action!