task 2 implementation