minor speed optimization