Add data transformation function