updated reagent example with new code