From Hartl book chapter 2