start formatting data for grm