split out create_raw_array function
rename functions