image retrieval code initial commit