optimize after reviewed agaist chapter 6