updated examples with code init