fixing examples code