added head first code