fixed root input, added recursion, add option to start at some directory instead of the root directory