swapping order of tasks