update gateway sample