... for ( i = 0; i < max; i++ ) { doSomething(); // I really think this part should be removed. /Stefan doSomethingElse(); // No, it shouldn't. /Björn } ... and even further down... // This code is strange. I fear it.