update example to match existing code