AUTO2 adapted from Johnston and DiNardo, 1997