code generated from book head first