Move to new lib that is function of the time segmenting