Transform Data

working on pieces for transformation function. error checking with
recursion isn’t working, so maybe a better way.