set up retrieval endpoint