minor changes and comments added
minor changes with comments added