changed the way the button works