handle all cases for swap case