updated changes for chapter 2 to adhere to MVC