update share API to support chaining style