Implement button handler