button object refactoring