lab2 4.3.4 init +refactor