added more tests on foreach
implemented foreach on arrays