made lum_func actually work