Used foreach to manipulate and categorize values within