Amides, both cyclic or acyclic, can be alkylated in the O- or N- position. Different reagents and conditions are used to cause greater O-alkylation or greater N-alkylation, depending on what is needed. What is the major driving force for achieving O- versus N- methylation? In other words, what is the mechanism behind the favorability of one over the other? Do acyclic amides react differently than cyclic amides under the same conditions? If so, why?