added chapter3.js