added some haddock documentation