made murali's suggested changes

except for highlighting code in a couple places