updated the share functionality