i think this can be moved to the database with `values_list` and `distinct()`