implemented the share functionality.