update sharing code