simplify examples code