You end up using `badges[i].assertion.badge` a lot. This should be stored in a variable.