-added updateState() method for all the buttons.