modified sharingDensity.sh