edit to data collection and preprocessing