code for class 3