add state button listener