improve button's API