added shell code for image retrieval