fixed bug of displaying S incorrectly
fixed bug of displaying S incorrectly, improved the appearance of output