Changed public share algorithm