minor speed ups