example code from class