Added filter_keys functionality