added some more retrieval code