updated examples to use proper API