adding GPU code; code still messy; also perf_data for final output