First basic way extended history algorithm implementation.