Lecture 9, tasks 1-3