fix examples to use new API