added all comments plus minor changes