recursive modify