Updated Mirror code to work in all permutations