completed implementation of sharing