[IMP] Improving sharing code