refactoring buttons completed