added foreachw in CodeUtils