Electronic spectra and magnetic properties of some rhenium(IV) and rhenium(III) complexes