added variable width button functionality