First part of the homework.