modifying the code to make it easier to subclass and implement custom toolbar button