initial working version
almost recursively works
removed junk
done for now