Task 2 implemented