update examples for new API