added comments

added file level comment and function level comments