add a working example from Joe's book