tweaks to make nicer code