added lengths plot script