refactoring accordion