swap with arrays too