minor tweaks to first version