minor formatting of code
a few adjustments