added comments to the algorithms
arranged Intro.