refactored for instance generation on csv read