added haddock comments