code for sharing