external button functionality added