rewrite the function to be simpler as well. the compiler can unroll the loop for us if necessary. ok schwarze