Extended the functionality to include scrolling.