adapted the example to work with the new version