Working code for Lab 2 part 1

Working code for Lab 2 part 1