responding to button pressed or value