further code size reduction on gateway