added some comments. made parsable by haddock.