fixed downward scrolling and added upward scrolling