fixed a small but majorly important typo, forgot Y[jm] in the expression for df/dc!