Updated examples code