Updates example to avoid deprecation warning