delete unused keys_to_remove logic