New line algo for lights