intermediate result for the algo