add code for answer retrieval