minor changes to lab2 code