ALMOST READY VERSION- sharing implemented