added buttons and scrollbar functionality