fixed logic bug where lums got overwritten by re-calculated lums value when it detected lum; also fixed significant digit problem by using absolute value function before getting length of value