added export logic, cleanup import data