adding a chapter on functional programming