removed unused reference to variable oldDisplay
removed unneeded field numShown