Task 17 with tests