Add source code for the first three chapter