made initial changes to lab 3 code