chord js code rectified