minor tweaks
reformat code