first untested api-gate code