modified image_extractor to fit our requirements