Code updated for class 6