adding second chapter code