mutate recursively