functionality added to buttons