Added Haddock to a function