task 18 with tests