changed the foreach loop to a toString call