zad 4.313 - ver2 refactoring