removed some unecessary transpositions