Updated examples with new API