add a filter_hash function