Added new length finding method.
Updated init_lengths.