minor tweaks to code and output styling