added haddock docs