Moved some computations outside a loop