activity history import small refactor