Max and swap