Added code for lab 2.