function layout to format different raw data formats