generating intermediate results