update share function