updating code for class 1