cosmetic changes to code
reindented according to style guide