fixed bug so original variables clear on every try, added permutations
of input vars need to pulg in to the rest of the code