added button functionality