many comments added and other minor changes