changing x<->y