Solve exercises for chapter #2