added for-loop testcase