improves performance through minor tweaks