refactored Button example