test removal of foreach loop