add send shared variable function