added new code for the calculation of individual models for each item