Some minor tweaks to the function