eliminate swap format function