added haddock comments.