improve button change logic