implemented the reply function.There is a bug.