lecture: lecture 07: finish head and tail