added first part of gateway registration