My code for remote sharing