Updated the helper to use the newer API