formatting gateway