remove recomputing values in loop