Task 2.2 coded