Added functionality for the button.