first stab at querying the image database.