added more comments. some little changes. no changes in functionality
added some more comments