output fixed, bug fixed (I think), hardcode removed, all for tifidf