On the direct exchange energy in Co2 and Co2+ doped lattices