added functionality to import images.