lecture: lecture 06: finish needed functions