Given an orthonormal basis $\{|i\rangle\}$, I am dealing with an operator that looks like this: $$L=\sum_{j=1}^N|j\rangle\langle j|+\sum_{j\ne k}|j\rangle\langle k|.$$ I would like to calculate its mean value for a generic mixed state $\rho=\sum_m p_m|\psi_m\rangle\langle\psi_m|$. I can write $$\text{Tr}(\rho L)=\sum_{i=1}^N\langle i|\left( \left( \sum_{m=1}^N p_m|\psi_m\rangle\langle\psi_m|\right)\left(\sum_{j=1}^N|j\rangle\langle j|+\sum_{j\ne k}|j\rangle\langle k|\right)\right)|i\rangle;$$ focusing on the first term and using the expansion $|\psi_m\rangle=\sum_l c_l^m|l\rangle$, I get $$\sum_{i=1}^N\langle i| \left( \sum_{m,j,l,l'}^Np_mc_l^m\bar c_{l'}^m|l\rangle\langle l'|j\rangle\langle j|\right) |i\rangle=\sum_{i=1}^N\langle i| \left( \sum_{m,j,l}^Np_mc_l^m\bar c_{j}^m|l\rangle\langle j|\right) |i\rangle=\sum_{i,m,j,l}^Np_mc_l^m\bar c_j^m\langle i|l\rangle\langle j|i\rangle=\sum_{i,m,j,l}^Np_mc_l^m\bar c_j^m {\delta_{il}\delta_{ji}}=\sum_{m,j}p_m|c_j^m|^2=1;$$ [similar calculations for the second term yield a zero. Therefore, I can write $\langle L\rangle=1$.] (Edit: As pointed out in the comment, this is wrong. What I get after reviewing is $$\sum_{i=1}^N \sum_{m,l,l'}^N \sum_{j\ne k}^N p_m c_l^m \bar c_{l'}^m \langle i|l\rangle \langle l'|j\rangle\langle k |i\rangle=\sum_m\sum_{j\ne k} p_m c_k^m \bar c_j^m=\sum_m\sum_{j\ne k}\langle k|p_m|\psi_m\rangle\langle \psi_m|j\rangle=\sum_{j\ne k}\langle k|\rho|j\rangle,$$ that is the sum of the off-diagonal elements of the density matrix.)
My question is: does everything I have written make sense? In particular, I am unsure about the final step as the expansion coefficients depend on both $m$ and $j$.
Any advice is greatly appreciated. Thanks in advance!