added button adding functionality