updated example to match new code