add reply function