delete useless code and fix the function of share