button functionality complete