refactored code to use one common button action method. DRY, y'all