aligned example.R and mpec.R