Task4 lab3 and unit test for it