refactored chord controller, included all cases