updated retrieval functionality
updated retrieval functionality