need to import from PIL for some legacy systems