simplified logic for button toggling + internalized  triggerChange method