Task 7 implementation