fixed for loop..
completely rewrited test-stmt