Update example code to include class