Update for the new  function signature