added reply function