update of import and some minor work on errors.