improvements on loop unrolling