Ex-8. Task 1-2 are implemented.