Implementation of two different strategies for calculation of search length.

include own header at the beginning