Implement the function of the Add button.