working on kb retrieval