Change example so it uses the public API