added some haddock comments