A molecular orbital theory approach to the wallach rearrangement