updating recursive