task 3 implementation