Added the code for lab class 6