Added cumalitive data adjustment algorithm

Not entirely convinced it works.