update gate