added update functionality to questions and answers