First part of lection 8 exercises