faster findlengths method
fixed findlengths bug
Merge remote-tracking branch 'upstream/master'