added functions for iterating over test set and stripping a dict below a certain threshold