added new method to handle toolbarDelegate