gateways creation part 1