lab3: add logging