Zadanie 3 with tests