Residual interaction in nuclei