reorganize Data handling from transformer