minor speed improvement