added button functionality to index