minor tweaks in code