minor speed improvemenst