code for class