update gates