add solution of chapter 3