updated example to reflect new interface