minor name changes, comments added
more comments