reformat
reworking some parts of import activity code