patch reply function.