Added functionality to button