overhaul gateway configuration