Added API for button toggling