how do i read the state of the button and save it..??