added a controller
end of chapter 3