added automatic scroll to end