Split data and raw dta functions in two