updated defines on gate code