preparing for some more advanced examples with local state etc.