gateway logic included