updated sample use of class