add batch deleting parents
refactor batch importing code