added new functionality to class

adjusted example to match new class funtions