added data.root input, still needs tweaking