Add code up to section 2.4.