Introduced  function and more documentation