Added functionality to buttons