Theoretical model for the Baeyer-Villiger rearrangement