I think I fiexed the xy switching