overriding scrollToItem function