task 2 lab 3 and unit test for it