saving intermediate results;