Using a simpler  function