Chapter 2 solved completely