Moved to foreach loop