split data and output code