gateway: add some comments