added gateway redirect