connected editReply method to database