Thanks but I want to remove the operations of the callback outside of my button class. I think the button class should be responsible for simply calling something else. In this first case it will be to write a CANbus message but later on it may be to do something totally different. Instead on having a button class with CANbus functionality and other unrelated functions it might be best to put all the other stuff outside this class.