built out gateway and response