Why do you need this delete_if?