Refoactored gateoperation before accomodating Observer.