minor speed tweaks