fixed addLum function