completed chapter 2. added controller.