moved data transform func to query definitions