for loop and foreach are both working, tests added and passed