initial import of working code without filemanager