replacing gateway with region