Ab initio SCF and DFT studies on solvent effects on intramolecular rearrangement reactions