implemented recompute_target **UNTESTED**