update examples with new API