started work on the reply function