working on live switch of button