returned to arithmetic instead of swaps