tweaks to logic