adding import os
correct region extractor