refined foreach loop to look for the [statuses] and pull that out as