completed Gateway __init__