make button more efficient

button enable  and disable when the situlation happens