buttons optimization