updated to work only on main cluster gateways