refactor disableButton function

remove else  statement