added the auto yscale feature