modified code to go around modeller bug in loop modeling and assessment at the same time