Extract refactor choose dataset type