add replace callbacks on chain