revised randfracfigs code -KL