some tweaks to the helper functions