process data fn