refactoring chord