change the gateway directory structure