Code amended to chose a random value from a narrower uniform distribution.