do not calculate this in every loop