refactoring clickButton