changed layout for gateway and device