updtes from chapter 4