changed the button index to do something