An application of second-order n-electron valence state perturbation theory to the calculation of excited states