I'm sure that this is very likely terrible code, but I'm at least finding the values I'm looking for.