Changed button functionality