lab1 - reworked