creating the add function to handle a button structure to be managed.