Zadanie 6 - improved