get everythinerything working and creates output file but gets hung with all 2000+ docs