created a permutations method
created Bits helper