Unroll loop for faster execution