example code for class