permutation of currency sequences, code cleanup