code for Class 7 lab component