move data transform to js