LSD with variable length