Better than before

Use the ApiDemo code of the samples