task 2 with tests