Added functionality to check button.