added smart scrolling