fix example to work with new API