more refactoring, added new data import