templatized data handling