how does a button work