swaps order of tasks