builds datai/dataf element by element